package com.thirtywords.analizer;

import java.util.HashMap;

import com.thirtywords.analizer.beans.Code;
import com.thirtywords.cleaner.HandyCleaner;

public class Analyzer {

	public static HashMap<String, Code> cache = new HashMap<String, Code>();

	public Analyzer() {

	}

	public String analize(String url) {
		
		url="file:///C:/Users/lzamboms/Desktop/page.htm";

		System.out.println(url);

		String fail = "no data";
		try {

			if (url.equals("")) {
				fail = "empty url";
			} else {

				HandyCleaner cleaner = new HandyCleaner(url);
				return cleaner.doClean();
			}
		} catch (Exception e) {
			e.printStackTrace();
		}
		return fail;
	}
}